package org.ccay.excel.importer.validate.impl;


/**
 * 电子邮件地址格式校验	
 * @author chaowangbang
 * @since Mar 26, 2012
 */
public class EmailValidator extends PatternValidator {
	
	public static final String MESSAGE_KEY = "ccay.excel.validate.email.error";
	
	/**
	 * 邮件地址模式
	 */
    public static final String emailAddressPattern =
    	"\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b";

	/**
	 * 构造函数
	 */
	public EmailValidator() {
		this.setPattern(emailAddressPattern);
		this.setCaseSensitive(false);
	}

}
